package com.chinaunicom.beanpostprocessor2;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author liry
 * @version 1.0
 * @date Created on 2021/12/9 15:18
 * Description:
 */
public class BeanPostProcessorMain {
	public static void main(String[] args) {
//		ClassPathXmlApplicationContext
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans-postprocessor2.xml");

		MyBeanPostProcessor beanPostProcessor = (MyBeanPostProcessor) applicationContext.getBean("myBeanPostProcessor");
		beanPostProcessor.display();

		Cat cat = (Cat) applicationContext.getBean("cat");
		System.out.println(cat.toString());
	}
}
